<template>
  <div class="search">
    <input type="text" class="search__input" placeholder="请输入搜索内容">
    <button class="search__button">
      <svg class="search__icon" aria-hidden="true" viewBox="0 0 24 24">
        <circle cx="11" cy="11" r="8" stroke="#b63a3a" stroke-width="2" fill="none" />
        <line x1="17" y1="17" x2="21" y2="21" stroke="#b63a3a" stroke-width="2" stroke-linecap="round" />
      </svg>
    </button>
  </div>
</template>

<script setup lang="ts">
</script>

<style scoped lang="less">
.search {
  display: flex;
  align-items: center;
  width: 300px;
  height: 40px;
  max-width: 100%;
  background: #fff;
  border: 2px solid #e2e2e2;
  border-radius: 32px;
  padding: 0 12px 0 18px;
  box-sizing: border-box;
  @media (max-width: 900px) {
    width: 100%;
    height: 40px;
    padding: 0 10px 0 14px;
  }
}

.search__input {
  flex: 1;
  font-size: 18px;
  border: none;
  background: transparent;
  color: #b4b4b4;
  outline: none;
  height: 100%;
  padding: 0;
  &::placeholder {
    color: #d2d2d2;
    font-size: 18px;
  }
  @media (max-width: 900px) {
    font-size: 16px;
    &::placeholder {
      font-size: 16px;
    }
  }
}

.search__button {
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.search__icon {
  width: 24px;
  height: 24px;
  display: block;
  @media (max-width: 900px) {
    width: 24px;
    height: 24px;
  }
}
</style>